    <link rel="stylesheet" href="css/menu.css" type="text/css" media="screen" />
    <link href="css/main.css" rel="stylesheet" type="text/css" /> 
    <link href="css/form.css" rel="stylesheet" type="text/css"> 
    <link href="css/button.css" rel="stylesheet" type="text/css" /> 
    <link href="css/jpaginate.css" rel="stylesheet" type="text/css" /> 
    <link rel="stylesheet" type="text/css" href="fancybox/jquery.fancybox-1.3.1.css" media="screen" />
	<script src="scripts/jquery-1.3.2.min.js" type="text/javascript"></script>
	<script src="scripts/jquery.corner.js" type="text/javascript"></script>
	<script src="scripts/jquery.dropshadow.js" type="text/javascript"></script>
    <script src="scripts/jquery.paginate.js" type="text/javascript"></script>
    <script src="scripts/menu.js" type="text/javascript"></script>
    <script src="scripts/login.js" type="text/javascript"></script>      
	<script type="text/javascript" src="./fancybox/jquery.mousewheel-3.0.2.pack.js"></script>
    <script type="text/javascript" src="./fancybox/jquery.fancybox-1.3.1.js"></script>
    
    <script src="scripts/addtype.js" type="text/javascript"></script>
    

    
    
<?php
	include('lib/common-functions.php');
	
    session_start(); 
    
    echo("<center>");
    echo("<div id='top'>");
    
	if( isset( $_SESSION['userid'] ) )
	{ 
		$username = $_SESSION['username'];        
		echo("<div id='title'> </div>");				
		echo("<div class='top_logout'>Welcome $username,  <a href='lib/logout.php'>Logout</a></div>");	
	}
	else
	{	 
	   
       echo <<< END
		<div id='title'> </div>
        <div id='top_nav'>
        
        
        <div id="divlogin">
              
        <div id="formlogin" style="display:none">
        <form name="login" action="lib/login.php" method="post">
         <div class="login_inputs">
            <label>Email</label> <br>
            <input name="email" type="text" size="14" /><br>
            <label>Password</label><br>
             <input name="psw" type="password" size="14" />
             <label class="forgot"><a href="#" id="btnrecovery">Forgot Password?</a></label>
         </div>
    
         <div class="login_button"><input type="image" name="button" id="button" src="img/login/ok_bt.jpg" /></div>
        </form>
       <form name="recovery" action="lib/recovery.php" method="post">
         <div class="login_inputs">
         <label id='title-recovery'>Password Recovery</label><br>
            <label>Email</label> <br>
            <input name="emailrecovery" type="text" size="14" />
           <input type="image" name="btnok" id="btnok" src="img/login/ok_bt.jpg" /><br>
            
         </div>
         <label class="feedback">pass sent to your email!</label>
  
        </form>
        
        </div>
        </div>	
        
              
      
        
        

        
        
        
        <div id="divbuttons" style="overflow:hidden">		
	    <div class='top_signup'><a href='signup.php'>SIGNUP</a></div>		
		<div class='top_login'><a id="btn_login" href='entrar.php'>LOGIN</a></div>
        </div>
        </div>	
    



        
        
                                                                
END;
	}
    
    echo("</div>"); // Close Div top 
    
?>